home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 May
/
1984-05.d64
/
ski physics 2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
50 lines
250 print"[147]":pokesc,152:poke36869,255
255 a=int(rnd(1)*3+1):b=int(rnd(1)*7+1):x=int(rnd(1)*26+5):y=int(rnd(1)*101+50)
260 ifa=1thend$="feet":tt$="seconds":v$="f/s"
265 ifa=2thend$="miles":tt$="hours":v$="mph"
270 ifa=3thend$="feet":tt$="minutes":v$="f/m"
280 onbgosub440,470,440,455,470,440,470
285 print:print:print:printtab(19)"[144][\":printtab(19)"]("
290 forn=19to15step-1:printtab(n)"(":nextn
295 printtab(12)"'''''":printtab(12)"'''''"
300 print"[156]'''''[158] %%%%%'''''":print"[156]'''''''''''''''''''''' "
305 print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
310 z=7680+(9*22)+20:c=z+30720:v=36878:f2=36875
315 input"[144] ";s$:s=val(s$):ifs=kthen360
330 pokev,15:print" uh uh! sorry "
335 form=230to190step-1:pokef2,m:fort=1to5:nextt:nextm
340 q=5:gosub480:pokev,0:forn=1to4:pokez,32:pokez+21,32:pokez+22,32:pokez+23,32
345 pokez+22,30:pokec+22,0:pokez+43,35:pokec+43,0:pokez+44,31:pokec+44,0
350 pokez+45,36:pokec+45,0:z=z+22:c=c+22:nextn
354 forn=0to4:pokez+20+n,38:pokec+20+n,7:nextn
355 poke36877,210:forl=15to0step-1:pokev,l:form=1to50:nextm:nextl:pp=1
356 poke36877,0:pokev,0:goto400
360 pokev,15:print" yep! thats right ":form=190to230:pokef2,m:fort=1to5:nextt:nextm
362 q=10:gosub480:pokev,0:forn=1to3:pokez,32:pokez+21,32:pokez+22,32:pokez+23,32
364 pokez+21,30:pokec+21,0:pokez+42,35:pokec+42,0:pokez+43,31:pokec+43,0
366 pokez+44,36:pokec+44,0:z=z+21:c=c+21:nextn
368 pokev,15:forl=148to220step.7:pokef2,l:nextl:pokev,0:fort=1to500:nextt:pp=2
400 print"[147]":pokesc,184
405 ifpp=1thenprintspc(134)"you lost this time"
407 ifpp=1thenprintspc(49)"better luck next time"
410 ifpp=2thenprintspc(158)"you solved the given problem"
412 fort2=1to5000:next
415 d=5:goto250
440 k=int(y/x)
441 printspc(24)"[144]a skier went ";y:print" ";d$
442 print"[144] in ";x;"";tt$
445 print"[144] what was his":print"[144] velocity in ";v$:return
455 k=x*y:printspc(24)"[144]a skier went ";x:print" ";v$:print"[144] for ";y"";tt$
460 print"[144] what was his":print"[144] distance in ";"";d$:return
470 k=int(y/x)
471 printspc(24)"[144]a skier went ";y:print" ";d$
472 print"[144] at ";x;"";v$
475 print"[144] how much time did":print"[144] he ski in ";tt$:return
480 forn=1to5:pokez,32:pokez+1,32:pokez+22,32:pokez+21,27:pokec+21,0
482 pokez+22,28:pokec+22,0:pokez+43,29:pokec+43,0:z=z+21:c=c+21:nextn
484 pokev,0:z=z-21:pokez,32:pokez+1,32:pokez+22,32
486 z=7680+(14*22)+14:c=z+30720:pokez+1,32
488 forn=1toq:pokez,32:pokez+21,32:pokez+22,32:pokez+23,32
490 pokez-1,30:pokec-1,0:pokez+20,35:pokec+20,0:pokez+21,31:pokec+21,0
492 pokez+22,36:pokec+22,0:z=z-1:c=c-1:nextn:return